﻿// Decompiled with JetBrains decompiler
// Type: PermitsAndVisasLeadsSyncher.Program
// Assembly: PermitsAndVisasLeadsSyncher, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 422BDC01-1AA1-4FAF-BEDC-7DC35EFEDF19
// Assembly location: C:\Virtual D\rnd\nagarro\scrumteamdailystatus\crm3\LeadSyncer\PermitsAndVisasLeadsSyncher.exe

using PermitsAndVisasLeadsSyncher.ApplicationFacade;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Microsoft.Practices.EnterpriseLibrary.Logging;
using Microsoft.Practices.EnterpriseLibrary.Logging.Formatters;
using Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners;
using PermitsAndVisasLeadsSyncher.Helpers.Logging;

namespace PermitsAndVisasLeadsSyncher
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            ILogger logger = LeadsSyncherLogger.CreateLogger();
            try
            {
                //Leads sync
                Syncher syncher = new Syncher();
                syncher.LeadSync();
            }
            catch (Exception ex)
            {
                logger.LogInfo("Inside Program.Main");
                logger.LogError(ex, string.Empty);
                logger.LogInfo("Stack Trace :" + ex.StackTrace);
            }
            finally
            {
                logger.Reset();
            }
            Console.WriteLine("Leads synced up successfully !");
            Console.Read();
        }
    }
}
